import 'package:flutter_cwhisky/generated/json/base/json_convert_content.dart';
import 'package:flutter_cwhisky/bean/mall_home_entity.dart';

MallHomeEntity $MallHomeEntityFromJson(Map<String, dynamic> json) {
	final MallHomeEntity mallHomeEntity = MallHomeEntity();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		mallHomeEntity.code = code;
	}
	final String? message = jsonConvert.convert<String>(json['message']);
	if (message != null) {
		mallHomeEntity.message = message;
	}
	final MallHomeData? data = jsonConvert.convert<MallHomeData>(json['data']);
	if (data != null) {
		mallHomeEntity.data = data;
	}
	final int? currentTime = jsonConvert.convert<int>(json['currentTime']);
	if (currentTime != null) {
		mallHomeEntity.currentTime = currentTime;
	}
	return mallHomeEntity;
}

Map<String, dynamic> $MallHomeEntityToJson(MallHomeEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['message'] = entity.message;
	data['data'] = entity.data?.toJson();
	data['currentTime'] = entity.currentTime;
	return data;
}

MallHomeData $MallHomeDataFromJson(Map<String, dynamic> json) {
	final MallHomeData mallHomeData = MallHomeData();
	final List<MallHomeDataAdvert>? advert = jsonConvert.convertListNotNull<MallHomeDataAdvert>(json['advert']);
	if (advert != null) {
		mallHomeData.advert = advert;
	}
	final List<MallHomeDataClassify>? classify = jsonConvert.convertListNotNull<MallHomeDataClassify>(json['classify']);
	if (classify != null) {
		mallHomeData.classify = classify;
	}
	final dynamic promotionGoods = jsonConvert.convert<dynamic>(json['promotionGoods']);
	if (promotionGoods != null) {
		mallHomeData.promotionGoods = promotionGoods;
	}
	final dynamic lot = jsonConvert.convert<dynamic>(json['lot']);
	if (lot != null) {
		mallHomeData.lot = lot;
	}
	final MallHomeDataMemberArea? memberArea = jsonConvert.convert<MallHomeDataMemberArea>(json['memberArea']);
	if (memberArea != null) {
		mallHomeData.memberArea = memberArea;
	}
	final List<MallHomeDataPrefecture>? prefecture = jsonConvert.convertListNotNull<MallHomeDataPrefecture>(json['prefecture']);
	if (prefecture != null) {
		mallHomeData.prefecture = prefecture;
	}
	final List<MallHomeDataRecommend>? recommend = jsonConvert.convertListNotNull<MallHomeDataRecommend>(json['recommend']);
	if (recommend != null) {
		mallHomeData.recommend = recommend;
	}
	final String? color = jsonConvert.convert<String>(json['color']);
	if (color != null) {
		mallHomeData.color = color;
	}
	final dynamic theme = jsonConvert.convert<dynamic>(json['theme']);
	if (theme != null) {
		mallHomeData.theme = theme;
	}
	final int? newerCouponType = jsonConvert.convert<int>(json['newerCouponType']);
	if (newerCouponType != null) {
		mallHomeData.newerCouponType = newerCouponType;
	}
	return mallHomeData;
}

Map<String, dynamic> $MallHomeDataToJson(MallHomeData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['advert'] =  entity.advert?.map((v) => v.toJson()).toList();
	data['classify'] =  entity.classify?.map((v) => v.toJson()).toList();
	data['promotionGoods'] = entity.promotionGoods;
	data['lot'] = entity.lot;
	data['memberArea'] = entity.memberArea?.toJson();
	data['prefecture'] =  entity.prefecture?.map((v) => v.toJson()).toList();
	data['recommend'] =  entity.recommend?.map((v) => v.toJson()).toList();
	data['color'] = entity.color;
	data['theme'] = entity.theme;
	data['newerCouponType'] = entity.newerCouponType;
	return data;
}

MallHomeDataAdvert $MallHomeDataAdvertFromJson(Map<String, dynamic> json) {
	final MallHomeDataAdvert mallHomeDataAdvert = MallHomeDataAdvert();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		mallHomeDataAdvert.code = code;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		mallHomeDataAdvert.title = title;
	}
	final String? subTitle = jsonConvert.convert<String>(json['subTitle']);
	if (subTitle != null) {
		mallHomeDataAdvert.subTitle = subTitle;
	}
	final bool? showTitle = jsonConvert.convert<bool>(json['showTitle']);
	if (showTitle != null) {
		mallHomeDataAdvert.showTitle = showTitle;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		mallHomeDataAdvert.image = image;
	}
	final int? type = jsonConvert.convert<int>(json['type']);
	if (type != null) {
		mallHomeDataAdvert.type = type;
	}
	final int? jumpType = jsonConvert.convert<int>(json['jumpType']);
	if (jumpType != null) {
		mallHomeDataAdvert.jumpType = jumpType;
	}
	final String? jumpUrl = jsonConvert.convert<String>(json['jumpUrl']);
	if (jumpUrl != null) {
		mallHomeDataAdvert.jumpUrl = jumpUrl;
	}
	final String? param = jsonConvert.convert<String>(json['param']);
	if (param != null) {
		mallHomeDataAdvert.param = param;
	}
	return mallHomeDataAdvert;
}

Map<String, dynamic> $MallHomeDataAdvertToJson(MallHomeDataAdvert entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['title'] = entity.title;
	data['subTitle'] = entity.subTitle;
	data['showTitle'] = entity.showTitle;
	data['image'] = entity.image;
	data['type'] = entity.type;
	data['jumpType'] = entity.jumpType;
	data['jumpUrl'] = entity.jumpUrl;
	data['param'] = entity.param;
	return data;
}

MallHomeDataClassify $MallHomeDataClassifyFromJson(Map<String, dynamic> json) {
	final MallHomeDataClassify mallHomeDataClassify = MallHomeDataClassify();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		mallHomeDataClassify.code = code;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		mallHomeDataClassify.image = image;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		mallHomeDataClassify.name = name;
	}
	final String? zhName = jsonConvert.convert<String>(json['zhName']);
	if (zhName != null) {
		mallHomeDataClassify.zhName = zhName;
	}
	final int? reorder = jsonConvert.convert<int>(json['reorder']);
	if (reorder != null) {
		mallHomeDataClassify.reorder = reorder;
	}
	final String? subIcon = jsonConvert.convert<String>(json['subIcon']);
	if (subIcon != null) {
		mallHomeDataClassify.subIcon = subIcon;
	}
	final String? subName = jsonConvert.convert<String>(json['subName']);
	if (subName != null) {
		mallHomeDataClassify.subName = subName;
	}
	final List<MallGoods>? goods = jsonConvert.convertListNotNull<MallGoods>(json['goods']);
	if (goods != null) {
		mallHomeDataClassify.goods = goods;
	}
	final int? brandSize = jsonConvert.convert<int>(json['brandSize']);
	if (brandSize != null) {
		mallHomeDataClassify.brandSize = brandSize;
	}
	final dynamic brandImage = jsonConvert.convert<dynamic>(json['brandImage']);
	if (brandImage != null) {
		mallHomeDataClassify.brandImage = brandImage;
	}
	final String? gif = jsonConvert.convert<String>(json['gif']);
	if (gif != null) {
		mallHomeDataClassify.gif = gif;
	}
	final dynamic children = jsonConvert.convert<dynamic>(json['children']);
	if (children != null) {
		mallHomeDataClassify.children = children;
	}
	final String? enName = jsonConvert.convert<String>(json['enName']);
	if (enName != null) {
		mallHomeDataClassify.enName = enName;
	}
	return mallHomeDataClassify;
}

Map<String, dynamic> $MallHomeDataClassifyToJson(MallHomeDataClassify entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['image'] = entity.image;
	data['name'] = entity.name;
	data['zhName'] = entity.zhName;
	data['reorder'] = entity.reorder;
	data['subIcon'] = entity.subIcon;
	data['subName'] = entity.subName;
	data['goods'] =  entity.goods?.map((v) => v.toJson()).toList();
	data['brandSize'] = entity.brandSize;
	data['brandImage'] = entity.brandImage;
	data['gif'] = entity.gif;
	data['children'] = entity.children;
	data['enName'] = entity.enName;
	return data;
}

MallGoods $MallGoodsFromJson(Map<String, dynamic> json) {
	final MallGoods mallGoods = MallGoods();
	final dynamic goodsId = jsonConvert.convert<dynamic>(json['goodsId']);
	if (goodsId != null) {
		mallGoods.goodsId = goodsId;
	}
	final String? goodsCode = jsonConvert.convert<String>(json['goodsCode']);
	if (goodsCode != null) {
		mallGoods.goodsCode = goodsCode;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		mallGoods.image = image;
	}
	final String? cnName = jsonConvert.convert<String>(json['cnName']);
	if (cnName != null) {
		mallGoods.cnName = cnName;
	}
	final String? enName = jsonConvert.convert<String>(json['enName']);
	if (enName != null) {
		mallGoods.enName = enName;
	}
	final int? promotionType = jsonConvert.convert<int>(json['promotionType']);
	if (promotionType != null) {
		mallGoods.promotionType = promotionType;
	}
	final double? marketPrice = jsonConvert.convert<double>(json['marketPrice']);
	if (marketPrice != null) {
		mallGoods.marketPrice = marketPrice;
	}
	final dynamic series = jsonConvert.convert<dynamic>(json['series']);
	if (series != null) {
		mallGoods.series = series;
	}
	final String? placeOfOrigin = jsonConvert.convert<String>(json['placeOfOrigin']);
	if (placeOfOrigin != null) {
		mallGoods.placeOfOrigin = placeOfOrigin;
	}
	final int? salesCount = jsonConvert.convert<int>(json['salesCount']);
	if (salesCount != null) {
		mallGoods.salesCount = salesCount;
	}
	final dynamic minOrderQuantity = jsonConvert.convert<dynamic>(json['minOrderQuantity']);
	if (minOrderQuantity != null) {
		mallGoods.minOrderQuantity = minOrderQuantity;
	}
	final int? usableIntegral = jsonConvert.convert<int>(json['usableIntegral']);
	if (usableIntegral != null) {
		mallGoods.usableIntegral = usableIntegral;
	}
	final dynamic salesFlag = jsonConvert.convert<dynamic>(json['salesFlag']);
	if (salesFlag != null) {
		mallGoods.salesFlag = salesFlag;
	}
	final int? balanceCount = jsonConvert.convert<int>(json['balanceCount']);
	if (balanceCount != null) {
		mallGoods.balanceCount = balanceCount;
	}
	final double? price = jsonConvert.convert<double>(json['price']);
	if (price != null) {
		mallGoods.price = price;
	}
	final dynamic promotionPrice = jsonConvert.convert<dynamic>(json['promotionPrice']);
	if (promotionPrice != null) {
		mallGoods.promotionPrice = promotionPrice;
	}
	final dynamic showPrice = jsonConvert.convert<dynamic>(json['showPrice']);
	if (showPrice != null) {
		mallGoods.showPrice = showPrice;
	}
	final dynamic showPriceType = jsonConvert.convert<dynamic>(json['showPriceType']);
	if (showPriceType != null) {
		mallGoods.showPriceType = showPriceType;
	}
	final dynamic cartItemCount = jsonConvert.convert<dynamic>(json['cartItemCount']);
	if (cartItemCount != null) {
		mallGoods.cartItemCount = cartItemCount;
	}
	final dynamic attrValueList = jsonConvert.convert<dynamic>(json['attrValueList']);
	if (attrValueList != null) {
		mallGoods.attrValueList = attrValueList;
	}
	final String? brandEnName = jsonConvert.convert<String>(json['brandEnName']);
	if (brandEnName != null) {
		mallGoods.brandEnName = brandEnName;
	}
	final String? brandCode = jsonConvert.convert<String>(json['brandCode']);
	if (brandCode != null) {
		mallGoods.brandCode = brandCode;
	}
	return mallGoods;
}

Map<String, dynamic> $MallGoodsToJson(MallGoods entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['goodsId'] = entity.goodsId;
	data['goodsCode'] = entity.goodsCode;
	data['image'] = entity.image;
	data['cnName'] = entity.cnName;
	data['enName'] = entity.enName;
	data['promotionType'] = entity.promotionType;
	data['marketPrice'] = entity.marketPrice;
	data['series'] = entity.series;
	data['placeOfOrigin'] = entity.placeOfOrigin;
	data['salesCount'] = entity.salesCount;
	data['minOrderQuantity'] = entity.minOrderQuantity;
	data['usableIntegral'] = entity.usableIntegral;
	data['salesFlag'] = entity.salesFlag;
	data['balanceCount'] = entity.balanceCount;
	data['price'] = entity.price;
	data['promotionPrice'] = entity.promotionPrice;
	data['showPrice'] = entity.showPrice;
	data['showPriceType'] = entity.showPriceType;
	data['cartItemCount'] = entity.cartItemCount;
	data['attrValueList'] = entity.attrValueList;
	data['brandEnName'] = entity.brandEnName;
	data['brandCode'] = entity.brandCode;
	return data;
}

MallHomeDataMemberArea $MallHomeDataMemberAreaFromJson(Map<String, dynamic> json) {
	final MallHomeDataMemberArea mallHomeDataMemberArea = MallHomeDataMemberArea();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		mallHomeDataMemberArea.code = code;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		mallHomeDataMemberArea.image = image;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		mallHomeDataMemberArea.name = name;
	}
	final String? zhName = jsonConvert.convert<String>(json['zhName']);
	if (zhName != null) {
		mallHomeDataMemberArea.zhName = zhName;
	}
	final int? reorder = jsonConvert.convert<int>(json['reorder']);
	if (reorder != null) {
		mallHomeDataMemberArea.reorder = reorder;
	}
	final String? subIcon = jsonConvert.convert<String>(json['subIcon']);
	if (subIcon != null) {
		mallHomeDataMemberArea.subIcon = subIcon;
	}
	final String? subName = jsonConvert.convert<String>(json['subName']);
	if (subName != null) {
		mallHomeDataMemberArea.subName = subName;
	}
	final List<MallGoods>? goods = jsonConvert.convertListNotNull<MallGoods>(json['goods']);
	if (goods != null) {
		mallHomeDataMemberArea.goods = goods;
	}
	final int? brandSize = jsonConvert.convert<int>(json['brandSize']);
	if (brandSize != null) {
		mallHomeDataMemberArea.brandSize = brandSize;
	}
	final dynamic brandImage = jsonConvert.convert<dynamic>(json['brandImage']);
	if (brandImage != null) {
		mallHomeDataMemberArea.brandImage = brandImage;
	}
	final String? gif = jsonConvert.convert<String>(json['gif']);
	if (gif != null) {
		mallHomeDataMemberArea.gif = gif;
	}
	final dynamic children = jsonConvert.convert<dynamic>(json['children']);
	if (children != null) {
		mallHomeDataMemberArea.children = children;
	}
	return mallHomeDataMemberArea;
}

Map<String, dynamic> $MallHomeDataMemberAreaToJson(MallHomeDataMemberArea entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['image'] = entity.image;
	data['name'] = entity.name;
	data['zhName'] = entity.zhName;
	data['reorder'] = entity.reorder;
	data['subIcon'] = entity.subIcon;
	data['subName'] = entity.subName;
	data['goods'] =  entity.goods?.map((v) => v.toJson()).toList();
	data['brandSize'] = entity.brandSize;
	data['brandImage'] = entity.brandImage;
	data['gif'] = entity.gif;
	data['children'] = entity.children;
	return data;
}

MallHomeDataPrefecture $MallHomeDataPrefectureFromJson(Map<String, dynamic> json) {
	final MallHomeDataPrefecture mallHomeDataPrefecture = MallHomeDataPrefecture();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		mallHomeDataPrefecture.code = code;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		mallHomeDataPrefecture.name = name;
	}
	final List<MallHomeDataPrefectureChildren>? children = jsonConvert.convertListNotNull<MallHomeDataPrefectureChildren>(json['children']);
	if (children != null) {
		mallHomeDataPrefecture.children = children;
	}
	final List<MallGoods>? goods = jsonConvert.convertListNotNull<MallGoods>(json['goods']);
	if (goods != null) {
		mallHomeDataPrefecture.goods = goods;
	}
	final String? title = jsonConvert.convert<String>(json['title']);
	if (title != null) {
		mallHomeDataPrefecture.title = title;
	}
	return mallHomeDataPrefecture;
}

Map<String, dynamic> $MallHomeDataPrefectureToJson(MallHomeDataPrefecture entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['name'] = entity.name;
	data['children'] =  entity.children?.map((v) => v.toJson()).toList();
	data['goods'] =  entity.goods?.map((v) => v.toJson()).toList();
	data['title'] = entity.title;
	return data;
}

MallHomeDataPrefectureChildren $MallHomeDataPrefectureChildrenFromJson(Map<String, dynamic> json) {
	final MallHomeDataPrefectureChildren mallHomeDataPrefectureChildren = MallHomeDataPrefectureChildren();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		mallHomeDataPrefectureChildren.code = code;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		mallHomeDataPrefectureChildren.image = image;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		mallHomeDataPrefectureChildren.name = name;
	}
	final String? zhName = jsonConvert.convert<String>(json['zhName']);
	if (zhName != null) {
		mallHomeDataPrefectureChildren.zhName = zhName;
	}
	final int? reorder = jsonConvert.convert<int>(json['reorder']);
	if (reorder != null) {
		mallHomeDataPrefectureChildren.reorder = reorder;
	}
	final String? subIcon = jsonConvert.convert<String>(json['subIcon']);
	if (subIcon != null) {
		mallHomeDataPrefectureChildren.subIcon = subIcon;
	}
	final String? subName = jsonConvert.convert<String>(json['subName']);
	if (subName != null) {
		mallHomeDataPrefectureChildren.subName = subName;
	}
	final List<MallGoods>? goods = jsonConvert.convertListNotNull<MallGoods>(json['goods']);
	if (goods != null) {
		mallHomeDataPrefectureChildren.goods = goods;
	}
	final int? brandSize = jsonConvert.convert<int>(json['brandSize']);
	if (brandSize != null) {
		mallHomeDataPrefectureChildren.brandSize = brandSize;
	}
	final dynamic brandImage = jsonConvert.convert<dynamic>(json['brandImage']);
	if (brandImage != null) {
		mallHomeDataPrefectureChildren.brandImage = brandImage;
	}
	final String? gif = jsonConvert.convert<String>(json['gif']);
	if (gif != null) {
		mallHomeDataPrefectureChildren.gif = gif;
	}
	final dynamic children = jsonConvert.convert<dynamic>(json['children']);
	if (children != null) {
		mallHomeDataPrefectureChildren.children = children;
	}
	return mallHomeDataPrefectureChildren;
}

Map<String, dynamic> $MallHomeDataPrefectureChildrenToJson(MallHomeDataPrefectureChildren entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['image'] = entity.image;
	data['name'] = entity.name;
	data['zhName'] = entity.zhName;
	data['reorder'] = entity.reorder;
	data['subIcon'] = entity.subIcon;
	data['subName'] = entity.subName;
	data['goods'] =  entity.goods?.map((v) => v.toJson()).toList();
	data['brandSize'] = entity.brandSize;
	data['brandImage'] = entity.brandImage;
	data['gif'] = entity.gif;
	data['children'] = entity.children;
	return data;
}

MallHomeDataRecommend $MallHomeDataRecommendFromJson(Map<String, dynamic> json) {
	final MallHomeDataRecommend mallHomeDataRecommend = MallHomeDataRecommend();
	final String? code = jsonConvert.convert<String>(json['code']);
	if (code != null) {
		mallHomeDataRecommend.code = code;
	}
	final String? image = jsonConvert.convert<String>(json['image']);
	if (image != null) {
		mallHomeDataRecommend.image = image;
	}
	final String? name = jsonConvert.convert<String>(json['name']);
	if (name != null) {
		mallHomeDataRecommend.name = name;
	}
	final String? zhName = jsonConvert.convert<String>(json['zhName']);
	if (zhName != null) {
		mallHomeDataRecommend.zhName = zhName;
	}
	final int? reorder = jsonConvert.convert<int>(json['reorder']);
	if (reorder != null) {
		mallHomeDataRecommend.reorder = reorder;
	}
	final String? subIcon = jsonConvert.convert<String>(json['subIcon']);
	if (subIcon != null) {
		mallHomeDataRecommend.subIcon = subIcon;
	}
	final String? subName = jsonConvert.convert<String>(json['subName']);
	if (subName != null) {
		mallHomeDataRecommend.subName = subName;
	}
	final dynamic goods = jsonConvert.convert<dynamic>(json['goods']);
	if (goods != null) {
		mallHomeDataRecommend.goods = goods;
	}
	final int? brandSize = jsonConvert.convert<int>(json['brandSize']);
	if (brandSize != null) {
		mallHomeDataRecommend.brandSize = brandSize;
	}
	final dynamic brandImage = jsonConvert.convert<dynamic>(json['brandImage']);
	if (brandImage != null) {
		mallHomeDataRecommend.brandImage = brandImage;
	}
	final String? gif = jsonConvert.convert<String>(json['gif']);
	if (gif != null) {
		mallHomeDataRecommend.gif = gif;
	}
	final dynamic children = jsonConvert.convert<dynamic>(json['children']);
	if (children != null) {
		mallHomeDataRecommend.children = children;
	}
	return mallHomeDataRecommend;
}

Map<String, dynamic> $MallHomeDataRecommendToJson(MallHomeDataRecommend entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['image'] = entity.image;
	data['name'] = entity.name;
	data['zhName'] = entity.zhName;
	data['reorder'] = entity.reorder;
	data['subIcon'] = entity.subIcon;
	data['subName'] = entity.subName;
	data['goods'] = entity.goods;
	data['brandSize'] = entity.brandSize;
	data['brandImage'] = entity.brandImage;
	data['gif'] = entity.gif;
	data['children'] = entity.children;
	return data;
}